/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.indexdatasource.domain;

import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 数据构建
 *
 * @author zhangbi617
 * @date 15/05/2017
 */
@Entity
@Table(name = "t_index_datasource_build")
@EntityListeners({AuditingEntityListener.class})
public class IndexDatasourceBuild {
    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long id;

    /**
     * 索引ID
     */
    @Column(name = "index_id")
    private Long indexId;

    /**
     * 定时任务
     */
    @Column(name = "cron")
    private String cron;

    /**
     * 增量定时任务
     */
    @Column(name="inc_cron")
    private String incCron;

    /**
     * 状态默认0
     */
    @Column
    private int status = 0;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCron() {
        return cron;
    }

    public void setCron(String cron) {
        this.cron = cron;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public Long getIndexId() {
        return indexId;
    }

    public void setIndexId(Long indexId) {
        this.indexId = indexId;
    }

    @Override
    public String toString() {
        return "IndexDatasourceBuild{" +
                "id=" + id +
                ", indexId=" + indexId +
                ", cron='" + cron + '\'' +
                ", incCron='" + incCron + '\'' +
                ", status=" + status +
                '}';
    }

    public String getIncCron() {
        return incCron;
    }

    public void setIncCron(String incCron) {
        this.incCron = incCron;
    }

}


